
set(INTERFACE "interface")
set(INTERNAL_INTERFACE "internal_interface")
set(IMPLEMENTATION "implementation")

add_library(Base STATIC 
${INTERNAL_INTERFACE}/Base_Hello_interface.cc
${IMPLEMENTATION}/Base_Hello_implement.cc
${INTERFACE}/Base_Interface.cc
)

target_include_directories(Base
          INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
          
          )


install(TARGETS Base DESTINATION lib)


SET_TARGET_PROPERTIES(Base PROPERTIES 
      Fortran_MODULE_DIRECTORY   "Bin"
     )

set(publih_lib_include "${PROJECT_BINARY_DIR}/gcm.cache")

add_custom_command(TARGET Base
  PRE_LINK  
  #COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_BINARY_DIR}/Base/gcm.cache/ ${publih_lib_include}
  #COMMAND ${CMAKE_COMMAND} -E make_directory ${publih_lib_include}
  COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/Base/gcm.cache/Base.gcm ${publih_lib_include}
)
